﻿using System;
using System.Diagnostics;
using AutoLoL.Shared;
using AutoLoL.Logic.Exceptions;

namespace AutoLoL.Logic.Windows
{
    public class LauncherWindow : BaseWindow
    {
        public LauncherWindow()
        {
            Process[] processes = Process.GetProcessesByName("lol.launcher");

            if (processes.Length > 0)
            {
                Handle = processes[0].MainWindowHandle;
            }

            if (Handle == IntPtr.Zero)
            {
                throw new WindowNotFoundException("Launcher");
            }
        }
    }
}
